<?php
 session_start();
?>
<?php include("header.php")?>
                 <?php
                 
                  $get=$_REQUEST[gioithieu];
                  $show=$_REQUEST[showpost];
                  $id=$_REQUEST[p];
                
                 ?>
                <div id="content">
                      <div class="slider-wrapper theme-default">
                            <div class="ribbon"></div>
                            <div id="slider" class="nivoSlider">
                                <img src="images/banner/b1.jpg" alt="" />
                                <a href="http://dev7studios.com"><img src="images/banner/b3.jpg" alt="" title="This is an example of a caption" /></a>
                                <img src="images/banner/b2.jpg" alt="" data-transition="slideInLeft" />
                                <img src="images/banner/b4.jpg" alt="" title="#htmlcaption" />
                            </div>
                            <div id="htmlcaption" class="nivo-html-caption">
                                <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
                            </div>
                        </div>
                        <script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
                        <script type="text/javascript">
                        $(window).load(function() {
                            $('#slider').nivoSlider();
                        });
                        </script>
                    <div id="primary">
                         
                          <div id="show_item"> 
                                  <?php
                                    if($_POST[timkiem]){
                                    $vl=$_POST[search];
                                    $cate=$_POST[danhmuc];
                                    $sql_s= "select * from sanpham where name like '%{$vl}%' and category like'%{$cate}%'";
                                    
                                    $mysql->query($sql_s);
                                    
                                        $kq=$mysql->num_row(); 
                                                   if($kq==0){
                                  
                                        ?> 
                                         <script type="text/javascript">
                                            alert("Khong tin thay san pham nao ca");
                                         </script>
                                        
                                        <?php
                                        }else{
                                       while($row=$mysql->fetchRow()){
                                       ?>
                                     <div class="item">
                                                
                                                <div id="gallery">
                                                     <ul>
                                                        <li>
                                                            <a href="upload/<?php echo$row[img];?>" title="<?php echo$row[mota];?>"> <img  src="upload/<?php echo$row[img];?>"/></a>
                                                        </li>
                                                     </ul>
                                                 </div>
                                                
                                                
                                                <div id="cart_c">
                                                    <div class="bt_left">
                                                     <p class="pric_">
                                                        <span class="gia" style="float: left;"> Giá bán:</span> <span style="color: red; font-weight: bold;"><?php echo$row[price];?>$</span>
                                                        <span class="muahang_"> <a href="product.php?idProduct=<?php echo $row[id]?>">Mua Hàng</a> </span>
                                                     </p>
                                                     </div>
                                                     <div class="thuM_mor"><p class="more"><a href="#">Chi tiet</a></p>
                                                      <div class="thumnail">
                                                        <p><?php echo $row[name];?></p>
                                                        <p><?php echo $row[chatlieu];?></p>
                                                        <p><?php echo $row[mota];?></p>
                                                        <p><?php echo $row[price];?></p>
                                                        <p><?php echo $row[ghichu];?></p>
                                                      </div>
                                                     
                                                     </div>
                                                </div> 
                                       </div>
                                      <?php }
                                      }
                                      
                                      }
                                      ?>
                                    
                          </div><!--end #dhtmlgoodies_aTab--->
                           
                            <div class="clear"></div>
                         </div>
                    </div><!--end #primary-->
                  <?php include("sidebar.php");?>
                  <div class="clear"></div>     
                </div><!--end #conttent-->
    <?php include("footer.php")?>



